import { Point } from '@/Utils/Point.js'
import { storeToRefs } from 'pinia'
import { useMapStore } from '@/stores/map.js'
import { Zondy_docLayer } from '@/views/Home/Map/Hooks/initMap'
const { map } = storeToRefs(useMapStore())
export const anotherChangeEventAttr = (eventData) => {
  var fid = eventData.id_
  var service = {
    name: 'guanggu',
    layerId: 2,
  }
  // var docLayer = Zondy_docLayer
  var docLayer = map.value.getLayers().array_[1]

  var attr = [{ type: 'number', key: '处理状态', value: Number(eventData.处理状态) }]
  var color
  switch (attr[0].value) {
    case 0:
      color = 6
      break
    case 1:
      color = 4
      break
    case 2:
      color = 90
      break
  }
  Point.update({ fid, attr, color, docLayer, service })
}
